

import java.util.*;
import java.lang.*;
import java.io.*;


class TJU_3205
{
	public static void main (String[] args) throws java.lang.Exception
	{
		Scanner sc = new Scanner(System.in);
		ArrayList<Integer> cows = new ArrayList<Integer>();
        int n = sc.nextInt();
        for(int i = 0; i < n; i++){
        	int[] array = new int[n];
        	for(int j  = 0; j < n; j++){
                array[j] = sc.nextInt();
                
                
        	}
        	Arrays.sort(array);
        	cows.add(array[(n/2)]);
        }
        Collections.sort(cows);
        System.out.println(cows.get(n/2));
	}
}